package com.qianyu.core.enumerate;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 设备类型枚举
 *
 * @author wangzhicheng
 * @date 2024/1/29 14:58
 * @description TODO
 */
@AllArgsConstructor
@NoArgsConstructor
public enum DataStatusEnum {
    DELETE("删除", -1),
    DISABLE("禁用", 0),
    ISABLE("正常", 1);
    private String name;
    private Integer val;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getVal() {
        return val;
    }

    public void setVal(Integer val) {
        this.val = val;
    }
    public static String getTypeName(Integer val){
        switch (val){
            case -1:
                return DELETE.name;
            case 0:
                return DISABLE.name;
            case 1:
                return ISABLE.name;
            default:
                return null;

        }
    }
}
